/* eslint-disable */
// @ts-ignore
import request from '@/utils/request';
import { CustomRequestOptions } from '@/interceptors/request';

import * as API from './types';

/** 查询检测项点分页列表 GET /item_point */
export async function itemPointGet3({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.ItemPointGetParams;
  options?: CustomRequestOptions;
}) {
  return request<API.ResponseModelResponseDataListModelItemPointModel_>(
    '/item_point',
    {
      method: 'GET',
      params: {
        ...params,
      },
      ...(options || {}),
    }
  );
}

/** 编辑检测项点 PUT /item_point */
export async function itemPointUpdate2({
  body,
  options,
}: {
  body: API.UpdateItemPointModel;
  options?: CustomRequestOptions;
}) {
  return request<API.ResponseModelObject_>('/item_point', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 新增检测项点 POST /item_point */
export async function itemPointInsert2({
  body,
  options,
}: {
  body: API.InsertItemPointModel;
  options?: CustomRequestOptions;
}) {
  return request<API.ResponseModelObject_>('/item_point', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 删除检测项点 DELETE /item_point */
export async function itemPointDelete({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.ItemPointDeleteParams;
  options?: CustomRequestOptions;
}) {
  return request<API.ResponseModelObject_>('/item_point', {
    method: 'DELETE',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 查询检测项点类别分页列表 GET /item_point/category */
export async function itemPointGet({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.ItemPointGetParams;
  options?: CustomRequestOptions;
}) {
  return request<API.ResponseModelResponseDataListModelItemPointCategoryModel_>(
    '/item_point/category',
    {
      method: 'GET',
      params: {
        ...params,
      },
      ...(options || {}),
    }
  );
}

/** 编辑检测项点类别 PUT /item_point/category */
export async function itemPointUpdate({
  body,
  options,
}: {
  body: API.UpdateItemPointCategoryModel;
  options?: CustomRequestOptions;
}) {
  return request<API.ResponseModelObject_>('/item_point/category', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 新增检测项点类别 POST /item_point/category */
export async function itemPointInsert({
  body,
  options,
}: {
  body: API.InsertItemPointCategoryModel;
  options?: CustomRequestOptions;
}) {
  return request<API.ResponseModelObject_>('/item_point/category', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 删除检测项点类别 DELETE /item_point/category */
export async function itemPointDeleteCategory({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.ItemPointDeleteCategoryParams;
  options?: CustomRequestOptions;
}) {
  return request<API.ResponseModelObject_>('/item_point/category', {
    method: 'DELETE',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 查询检测项点类别详情 GET /item_point/category/detail */
export async function itemPointGetCategory({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.ItemPointGetCategoryParams;
  options?: CustomRequestOptions;
}) {
  return request<API.ResponseModelItemPointCategoryModel_>(
    '/item_point/category/detail',
    {
      method: 'GET',
      params: {
        ...params,
      },
      ...(options || {}),
    }
  );
}

/** 查询检测项点类别列表 GET /item_point/category/list */
export async function itemPointGet2({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.ItemPointGetParams;
  options?: CustomRequestOptions;
}) {
  return request<API.ResponseModelListItemPointCategoryModel_>(
    '/item_point/category/list',
    {
      method: 'GET',
      params: {
        ...params,
      },
      ...(options || {}),
    }
  );
}

/** 查询检测项点详情 GET /item_point/detail */
export async function itemPointGet4({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.ItemPointGetParams;
  options?: CustomRequestOptions;
}) {
  return request<API.ResponseModelItemPointModel_>('/item_point/detail', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 编辑检测项点上架状态 PUT /item_point/list_status */
export async function itemPointUpdate3({
  body,
  options,
}: {
  body: API.UpdateItemPointListStatusModel;
  options?: CustomRequestOptions;
}) {
  return request<API.ResponseModelObject_>('/item_point/list_status', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 编辑检测项点是否热门 PUT /item_point/popular */
export async function itemPointUpdate4({
  body,
  options,
}: {
  body: API.UpdateItemPointPopularModel;
  options?: CustomRequestOptions;
}) {
  return request<API.ResponseModelObject_>('/item_point/popular', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
